# Contributor: jpdw34 <jpdw34@gmail.com>
# Maintainer: jpdw34 <jpdw34@gmail.com>
pkgname=libbamf
_pkgname=bamf
pkgver=0.5.6
_pkgver=0.5
pkgrel=1
pkgdesc="Window matching library"
url="https://launchpad.net/bamf"
arch="all"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="libwnck3-dev libgtop-dev"
makedepends="$depends_dev glib-dev py3-lxml"
subpackages="$pkgname-doc $pkgname-dev"
source="https://launchpad.net/$_pkgname/$_pkgver/$pkgver/+download/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
       default_prepare
       # config.sub is too old to recognize loongarch64-alpine-linux-musl
       update_config_sub
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--build=$CBUILD \
		--host=$CHOST \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir/usr/lib/systemd" "$pkgdir/usr/share/upstart"
}

sha512sums="
cfb2dcc511bc4c30b6ea167d2502784e5e1f3baada24d916842bd0cf8e920b78e3c120157136f818899a899979a648c666d85a54a8573c56edeb8743b7da7601  bamf-0.5.6.tar.gz
"
